import java.util.ArrayList;
import java.util.List;

public class ListStringDemo {
  public static void main(String[] args) {
    //
    List<String> listStr = getListStr();
    //List<String> listStr = new ArrayList<>();
    int size = listStr.size();
    int num = 100;
    for (int start = 0, end = num; start < size - 1; start += num, end += num) {
      if (end > size) {
        end = size;
      }
      List<String> strings = listStr.subList(start, end);
      System.out.println(":" + strings);
    }
  }

  /**
   * list 分页,list拆分
   *
   * @return
   */
  static List<String> getListStr() {
    ArrayList<String> list = new ArrayList<>();
    for (int i = 0; i < 1000; i++) {
      list.add(i + "");
    }
    return list;
  }
}
